﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EBFHelper.Util
{
    public static class EBFHelperUtil
    {
        public static void checkProjectItemNode(EnvDTE.ProjectItems projectItems, IList<EnvDTE.ProjectItem> pItems)
        {
            foreach (EnvDTE.ProjectItem pi in projectItems)
            {
                //判断是否为三个重要节点
                if (pi.Name.Equals("Actions") || pi.Name.Equals("Operations") || pi.Name.Equals("OpSteps"))
                {
                    pItems.Add(pi);
                }
                if (pItems.Count>=2)
                {
                    break;//起码找到了ACTIONS 以及Operations节点
                }
                //没有子节点
                if (pi.ProjectItems != null)
                {
                    checkProjectItemNode(pi.ProjectItems, pItems);
                }
            }
        }
    }
}
